package com.jiazhong.重写;

public class Dog extends Animal {
    @Override
    public void cry() {
        System.out.println("小狗汪汪叫");
    }


    @Override
    public String m1() {
        return null;
    }
//子类不能缩小父类的访问权限
// public>protected>默认>private

/*
    @Override
    public Object m2() {//这里的Object不是String的子类，因此编译错误
        return super.m2();
    }
*/

    @Override
    public BBB m3() {
        return null;
    }

    @Override
    protected void eat() {
    }
}
